package com.cskaoyan.bean.usersadmin;

import com.cskaoyan.bean.po.MarketFootprint;
import lombok.Data;

import java.util.List;

/**
 * ClassName: FootprintData
 * Description:
 * date: 2022/6/5 20:28
 *
 * @author bruce
 * @since JDK 8
 */
@Data
public class FootprintData {

    /**
     * total : 1377
     * pages : 69
     * limit : 20
     * page : 1
     * list : [{"id":1392,"userId":1,"goodsId":1181111,"addTime":"2022-05-28 13:53:00","updateTime":"2022-05-28 13:53:00","deleted":false},{"id":1391,"userId":1,"goodsId":1181111,"addTime":"2022-05-15 19:58:33","updateTime":"2022-05-15 19:58:33","deleted":false}]
     */

    private Integer total;
    private Integer pages;
    private Integer limit;
    private Integer page;
    private List<MarketFootprint> list;

    public static FootprintData data(long total, int pages, int limit, int page, List<MarketFootprint> list) {
        FootprintData footprintData = new FootprintData();
        footprintData.setTotal((int) total);
        footprintData.setPages(pages);
        footprintData.setLimit(limit);
        footprintData.setPage(page);
        footprintData.setList(list);
        return footprintData;
    }
}
